package com.getpebble.android.framework.protocol.inbound;

import com.getpebble.android.bluetooth.protocol.ProtocolMessage;
import com.getpebble.android.framework.protocol.inbound.PblInboundAppInstallMessage.AppInstallResponseType;
import com.getpebble.android.framework.util.ByteUtils;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

public class PblInboundAppListInstallMessage extends PblInboundAppInstallMessage {
    private int mAppCount;
    private List<UUID> mAppUuidList = new ArrayList(this.mAppCount);

    public PblInboundAppListInstallMessage(ProtocolMessage message) {
        super(message);
        ByteBuffer buffer = message.getDataBuffer();
        checkResponseType(buffer.get());
        this.mAppCount = buffer.getInt();
        for (int i = 0; i < this.mAppCount; i++) {
            this.mAppUuidList.add(ByteUtils.bytes2uuid(buffer));
        }
    }

    public List<UUID> getAppUuidList() {
        return this.mAppUuidList;
    }

    public AppInstallResponseType getResponseType() {
        return AppInstallResponseType.APP_LIST;
    }

    protected int getMinSize() {
        return 5;
    }
}
